import 'package:flutter/material.dart';
import './routers/routers.dart';
import 'package:bitsdojo_window/bitsdojo_window.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(const MyApp());
  // doWhenWindowReady(() {
  //   final win = appWindow;
  //   final initialSize = Size(400, 800);
  //   win.minSize = initialSize;
  //   win.size = initialSize;
  //   win.maxSize = initialSize;
  //   win.alignment = Alignment.center; // 将窗口显示到中间
  //   win.show();
  // });
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.amber,
        fontFamily: 'DingTalk',
        appBarTheme: const AppBarTheme(
          centerTitle: true,
        ),
      ),
      initialRoute: '/',
      onGenerateRoute: onGenerateRoute,
    );
  }
}


